/* 
 * File:   KnockingStrategyConjunction.h
 * Author: root
 *
 * Created on November 16, 2008, 5:51 PM
 */

#ifndef _KNOCKINGSTRATEGYCOLLECTION_H
#define	_KNOCKINGSTRATEGYCOLLECTION_H

#include "KnockingStrategy.h"
#include "DrawingStrategy.h"
#include "StrategyCodec.h"

class KnockingStrategyCollection : public KnockingStrategy {
    
    KnockingStrategy* collection[AVAILABLE_KNOCKING];
    int numStrategies;
    
public:
    
    virtual int getDecisionCertainty();
    
    KnockingStrategyCollection(KnockingStrategy** strategyGroup) 
    : KnockingStrategy((int) 0), numStrategies(AVAILABLE_STRATEGIES[KNOCKING])
    {
        for (int i = 0; i < numStrategies; i++) {
            collection[i] = strategyGroup[i];
        }
    }
    
    virtual void setDrawingStrategy(DrawingStrategy* strategyRef);
    
    virtual Strategy* getActiveInstance(int) { return NULL; }
    
    virtual void setExecutionParameter(int index, int rangeFraction) {}
    
    virtual void opponentMove(int, const Move&);
    virtual bool decideKnock(CCardStack*, const GameState*);
    
    virtual ~KnockingStrategyCollection() {
        for (int i = 0; i < numStrategies; i++) {
            delete collection[i];
        }
    }
    
};

#endif	/* _KNOCKINGSTRATEGYCOLLECTION_H */

